home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
datatypes
/
multiprint
/
source
/
init.c
next >
Wrap
C/C++ Source or Header
|
1995-08-08
|
1KB
|
58 lines
/*
** $PROJECT: MultiPrint - print datatype objects
**
** $VER: Init.c 39.0 (07.08.95)
**
** by
**
** Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
**
** (C) Copyright 1995
** All Rights Reserved !
**
** $HISTORY:
**
** 07.08.95 : 039.000 : initial
*/
/* ------------------------------- includes ------------------------------- */
#include "MultiPrint.h"
/* ------------------------------ definition ------------------------------ */
#define PUDDLE_SIZE 4096
#define THRESH_SIZE 4096
/* ---------------------------- init function ----------------------------- */
void Free(struct GlobalData *gd)
{
DeletePool(gd->gd_Pool);
}
#undef SysBase
struct GlobalData *Init(void)
{
struct Library *SysBase = *((struct Library **) 4L);
struct GlobalData *gd = NULL;
APTR pool;
if(SysBase->lib_Version >= 39)
{
if((pool = CreatePool(MEMF_ANY | MEMF_CLEAR,PUDDLE_SIZE,THRESH_SIZE)) != NULL)
{
if((gd = AllocPooled(pool,sizeof(struct GlobalData))) != NULL)
{
gd->gd_SysBase = SysBase;
gd->gd_Pool = pool;
} else
DeletePool(pool);
}
}
return(gd);
}